<?php
class MediaFinder extends CWidget {
    public $show_type; // 表格、列表或者图标显示 table、list、icon
    public function run() {
        $sw = (isset(Yii::app()->request->cookies['sw_file_name']))
            ? Yii::app()->request->cookies['sw_file_name'] : '';
        $sw = '';
        $this->render('MediaFinder', array(
            'datas' => MediaCategory::model()->getCTreeViewDatas(),
            'sw' => $sw,
            'show_type' => $this->show_type,
        ));
    }
}
